Read about testcomplete wait for page to load, The latest news, videos, and discussion topics about testcomplete wait for page to load from alibabacloud.com
Frame.html
Selenium code
public static void Testiframe (Webdriver driver)
{
Driver.get ("E:\\stashfolder\\[email protected]\\stash\\tank-moneyproject\\ Pudong Software Park Training center \ \ My Textbook \\Selenium webdriver\\ Frame\\main.html ");
At the time of the main window
Driver.findelement (By.id ("Maininput")). SendKeys ("main input");
When the IFRAME
The right function is not found in the front.Try{thread.sleep (10);} catch (Exception e) {}But this time had to control itself, forcing the wait to load, a very 2 way, and then finally found a suitable replacement functionDriver.manage (). Timeouts (). implicitlywait (Timeunit.seconds);10 of the unit is seconds, meaning 10 to wait up to 10 seconds, if still can't
1) method Driver1 Call:1 @BeforeClass 2 Public void throws Exception {3 // Startup Scripts 4 5 // Launch Browser 6 Driver (Config.browserpath, config.browserdriverpath); 7 Driver1 (CONFIG.WEBURL1); 8 }2) method Driver1 implementation, in the method using the display wait, the code is as follows:1 //opens the specified URL2 Public StaticWebelement Driver1 (String webUrl)throwsException {3 //let the browser access the Web4De
Java Selenium Smart Wait page load complete
We often encounter the use of selenium to manipulate an element on the page, you need to wait for the page to be completed after loading to operate. Otherwise, the element on the
When the page loads, let it show the enveloped layer and load wait picture (the result is perfect, the process is very bumpy, so it must be summarized and sorted, spare):With the Ajax asynchronous, because the JS content can not be displayed immediately, because JS is a single-threaded, to put the queue of the task after the execution of the JS processing just no
/** Resolve the data entered in the textarea to the database and read to the page no Line wrapping effect* Textarea_info is the class displayed in the page content area* How to use: Add class= "Textarea_info" directly to the corresponding area* TEXTAREA_BR () can be called in JS.* */function Textarea_br () {var element = $ (". Textarea_info");Element.each (function () {var temp = $ (this). Text (). replace
AJAX Full name Asynchronous JavaScript and XML (asynchronous JavaScript and XML). It is not a new technology, but a combination of the following kinds of original technologies.
1 use CSS and XHTML for presentation.
2 Use the DOM model for interactive and dynamic display.
3 use XMLHttpRequest to communicate with the server asynchronously.
4 use JavaScript to bind and invoke.
With Ajax asynchronous technology, you can use the XMLHttpRequest object to complete the HTTP request/Answer (RESPONSE
In the load, wait for the DIV:To determine the reset button:Divclass= "Form-group row"> Divclass= "conf"style= "Float:left"onclick= "conf ()"ID= "conf">Are you sureDiv> Divclass= "Reset"style= "Float:left"onclick= "Reset ()"ID= "Reset">ResetDiv>Div>Load, please wait for the CSS style, set it to the center of the
Var oProgressLayer = null;/*************************************** **************************************** *****************// Set all elements on the Web page to events that are not responsive, and set the mouse cursor to wait**************************************** **************************************** *****************/Function SetBusy (){For (var iCnt = 0; iCnt Try {document. all [iCnt]. oldCursor =
At last week's website performance Workshop, we learned that almost half of the visitors would give up the site if they realized that a page or a feature would take more than two seconds to load time.
The key is the "awareness" page load.
What if there is a way to entertain an audience when a
iasynchttphandler-at first glance, it seems to help a longer page request. However, this asynchronous HTTP processor is designed to release the processor-although some tasks on top of a page take some time but do not require any CPU. A good example is to issue a Web request in the middle of a page. In this case, the asynchronous HTTP processor is very efficient.
This example describes the jquery processing page pop-up query data waiting operation. Share to everyone for your reference. The implementation methods are as follows:
$ (document). Ready (function () {
layer.load (0);
Initialize the load
//optional range (0-9) 0 to return the results after the result is closed, 1-9 for the automatic shutdown time (s)
});
Set the style to turn off waiting when t
the normal display page progresslayout.showcontent ();
}
}; Start loading ...
Let's say that starting from here a time-consuming operation will start, in this startup process, developers want users to take a break, wait ...
Progresslayout.showprogress ();
Suppose there is a time-consuming load business logic that takes a second to complete.
Handler.se
The problem of two page load delays is doubled when the same browser is built on different pages of the same site through Yii while the same database is time-consuming query operation
A page query, the front-end display needs about 10s of time, but users do not want to wait, want to see the navigation bar of the othe
, CSS, parsing, and executing JavaScript code
When the client resolves the binary data sent over to the server
The client browser will also parse the binary data into a string based on the encoding type
Then, according to the HTTP protocol, the response message sent by the server is resolved.
Then, according to the message content in the response message (message header, newspaper style) to do the specific analysis
When the browser encounters some static resources during parsing, it re
BODY. In this case, you can consider loading the core functions in advance by means of pre-loading in the front, this can accelerate the display of core functions.
(4) Early Javascript initialization and binding of core functions
Most of the current practices are to initialize and bind all Javascript Functions in DOM Ready, and some of them are carried out at the bottom of the page. The advantages of these two methods are that they are simple, you do
Read Catalogue
1. Realization of Ideas
2. Demo Instructions
3. Precautions
4. Summary
In doing H5 mobile page, I believe you must have encountered the page has been opened, but the picture has not been loaded out of the situation, although this problem does not affect the function of the page, but not conducive to user experience. Aside
to start.
(3) Impact factor of Start render indicator iii. Page Load definition
Page load time refers to the time that the Window.onload event was triggered. Page load tends to be more time-dependent than DOM ready time because
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.